<layout name='Layout/layout_main' />
<input type="hidden" id="id" name="id" value="{$vo.id}">
<div class="title panel panel-default">
	<div class="panel-body">
		<h3 class="col-md-12">{$vo.name}</h3>
	</div>
</div>
<div class="operate panel panel-default">
	<div class="panel-body">
		<div class="pull-left">
			<a onclick="go_return_url();" class="btn btn-default">返回</a>
			<if condition="$auth['admin']">
				<a onclick="del();" class="btn btn-default">删除</a>
			</if>
		</div>
		<div class="pull-right">
			<a onclick="myprint()" class="btn btn-default">打印</a>
			<if condition="$auth['write']">
				<a onclick="edit();" class="btn btn-default">修改</a>
			</if>
		</div>
	</div>
</div>
<form method='post' id="frm_content" name="frm_content" enctype="multipart/form-data"  class="well form-horizontal">
	<input type="hidden" id="id" name="id" value="{$vo.id}">
	<div class="form-group col-md-6">
		<label class="col-md-4 control-label">编号：</label>
		<div class="col-md-8">
			<p class="form-control-static">
				{$vo.notice_no}
			</p>
		</div>
	</div>

	<div class="form-group col-md-6">
		<label class="col-md-4 control-label" >登录日期：</label>
		<div class="col-md-8">
			<p class="form-control-static">
				{$vo.create_time|toDate='Y年m月d日 H:i'}
			</p>
		</div>
	</div>

	<div class="form-group col-md-6">
		<label class="col-md-4 control-label" >登录人：</label>
		<div class="col-md-8">
			<p class="form-control-static">
				{$vo.user_name}
			</p>
		</div>
	</div>

	<div class="form-group col-md-6">
		<label class="col-md-4 control-label" >管理者：</label>
		<div class="col-md-8">
			<p class="form-control-static">
				{$admin|show_contact}
			</p>
		</div>
	</div>
	<div class="clearfix"></div>
	<div class="form-group">
		<div class="col-md-12">
			<div id="content_wrap" >
				<iframe id="content_iframe"></iframe>
			</div>
			<textarea id="content_1" name="content" style="width:100%;display:none">{$vo.content}</textarea>
		</div>
	</div>
	<div class="form-group">
		<label class="col-md-2 control-label" for="name">附件：</label>
		<div class="col-md-10">
			<include file="Layout:file_list" />
		</div>
	</div>
</form>
<script type="text/javascript">
	$(function() {
		show_content();
	});
	function del() {
		sendAjax("{:U('del')}", 'id=' + $("#id").val(), function(data) {
			if (data.status) {
				alert(data.info);
			}
		});
	}

	function attach_down(obj) {
		winopen("{:U('down')}?attach_id=" + $(obj).attr("file_id") + "&id/" + $("#id").val(),730, 300);
	}

	function edit() {
		window.open(fix_url("{:U('edit')}?id=" + $("#id").val()), "_self");
	}

	function myprint() {

	}
</script>